package com.ray.mapper;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.ray.bean.DepartmentBean;
import com.ray.bean.FeedOrderDetailBean;
import com.ray.bean.OrderBean;
import com.ray.bean.OrderBoLiangBean;
import com.ray.bean.OrderDeatilBean;
import com.ray.bean.OrderProcedureTemplateBean;
import com.ray.bean.ProcedureBean;
import com.ray.bean.ProcessBean;
import com.ray.bean.ReportBean;
import com.ray.bean.TypeColorBean;
import com.ray.bean.WorkshopProductionCycleBean;

public interface OrderProcedureTemplateMapper {

	//添加模板
	void insertTemplate(Map map);

	//添加模板工序
	void insertTemplateProcedure(Map map);

	//查找模板id
	List<String> getTempId(Map map);

	//查找模板条数
	int getTempIdCount(Map map);

	//获取模板数据
	List<OrderProcedureTemplateBean> getOrderProcedureTemplateDate(@Param("tempIdList")List<String> tempIdList);

	//删除模板
	void deleteTemplate(Map map);

	//获取用户id
	List<String> getUserId(Map map);

	//获取用户条数
	int getUserIdCount(Map map);

	//获取用户工序数据
	List<OrderProcedureTemplateBean> getuserrProcedureDate(@Param("userIdList")List<String> userIdList);

	//添加用户工序
	void insertUserProcedure(Map map);

    //获取订单列表
	List<String> getOrderId(Map map);

    //获取订单条数
	int getOrderIdCount(Map map);
	
	//获取订单真实报工数据
	List<OrderProcedureTemplateBean> getOrderRealProcedureDate(Map map);

	//添加订单工序
	void addOrderProcedure(Map map);

	//获取所有工序
	List<OrderProcedureTemplateBean> getAllTemp(Map map);

    //获取模板工序
	List<ProcessBean> getProcess(Map map);

   //获取订单工序
	List<ProcessBean> getOrderProcess(Map map);

	//获取用户车间
	List<WorkshopProductionCycleBean> getUserWorkShop(Map map);

//	//获取报工车间
//	List<WorkshopProductionCycleBean> getReportWorkShop(Map map);

    //获取用户报工工序
	List<ProcessBean> getUserProcedure(Map map);
    //获取报工工序
//	List<ProcessBean> getReportProcedure(Map map);

	//获取订单车间
	List<WorkshopProductionCycleBean> getOrderWorkShop(Map map);

	//移除模板工序
	void removeTemplateProcedure(Map map);

    //获取模板已有工序
	List<ProcessBean> getTemolateProcess(Map map);

	//移除用户工序
	void removeUserProcedure(Map map);

	//修改模板名称
	void updateTempName(Map map);

	//移除订单工序
	void removeOrderProcedure(Map map);

	//获取合并集合的id
	List<String> getMergeToWorkShop(@Param("id")String id);

	//后去合并车间的工序
	List<ProcessBean> getMergeProcessBean(@Param("mergeIdList")List<String> mergeIdList,@Param("orderId") String orderId);

	//查询此车间是否被和合并
	List<String> getMergeWorkShop(@Param("id")String id);

	//获取需要显示的订单信息
	OrderBean getOrder(@Param("orderId")String orderId);

	//获取订单投料数
	Integer getFeedCount(@Param("orderId")String orderId);

	//获取生产订单明细
	List<OrderBoLiangBean> getOrderDetail(@Param("orderId")String orderId);

	//获取已报工的工序id
	List<ProcessBean> getAleradyProcedure(Map map);

	//获取订单工序报工数据
	List<ReportBean> getProcedureReport(Map map);

	//删除打印详情数据
	void deletePrientDetail(Map map);

//	插入打印详情
	void insertPrientDetail(Map map);

	//获取订单已有的工序
	List<ProcessBean> getOrderHaveProcedure(Map map);

	//获取已经报工的车间工序
	List<WorkshopProductionCycleBean> getAleradyWorkshopProcedure(Map map);

	//获取模板车间
	List<WorkshopProductionCycleBean> getTempWorkShop(Map map);

	//获取实际生产情况和订单详情对比结果
	List<Integer> getYuShuList(Map mm);


	//获取订单在此车间的工序
	List<String> getAleryHaveWorkProcedureList(Map map);

	List<ProcessBean> getOrderFomrtProcess(Map map);

	//获取订单车间颜色
	List<String> getOrderWorkColor(Map paramMap);

	//获取交接至客户的数量
	Integer getToCoustomProcedureCount(Map map);

	/**
	 * orderId(订单编号)
	 * @param map
	 * @return
	 */
	DepartmentBean getDeptInWorkShopMode(Map map);

	/**
	 * 获取此订单在本车间出库数
	 * @param mm
	 * @return
	 */
//	List<ProcessBean> getOrderOutMaterialCount(Map mm);

	/**
	 * 获取订单结构树的工序
	 * @param map
	 * @return
	 */
	List<ProcessBean> getTreeProcess(Map map);

	/**
	 * 获取结构数车间
	 * @param map
	 * @return
	 */
	List<WorkshopProductionCycleBean> getOrderTreeWorkShop(Map map);

	/**
	 * 获取订单没有领料的物料
	 * @param orderId
	 * @return
	 */
	List<FeedOrderDetailBean> getOrderNotReceiveMaterial(@Param("orderId")String orderId);

	/**
	 * 获取订单未审核信息
	 * @param string
	 * @return
	 */
	Set<ReportBean> getNotApprovalMessage(@Param("orderId")String string);

	/**
	 * 根据订单与工序获取结构树工序
	 * @param map
	 * @return
	 */
	ProcessBean getTreeProcessByProcedureId(Map map);

	/**
	 * 
	 * @param processBean
	 * @return
	 */
	ProcessBean getNextProcedureByProcessBean(ProcessBean processBean);

	/**
	 * 从人工设置的订单工序中获取下一道工序
	 * @param map
	 * @return
	 */
	ProcessBean getNextProcedureFromSet(Map map);

	/**
	 * 获取订单工艺数分车间工序
	 * @param map
	 * @return
	 */
	List<OrderProcedureTemplateBean> getOrderTreeData(Map map);

	/**
	 * 获取工厂型号
	 * @param company
	 * @param factoryId
	 * @return
	 */
	List<ProcessBean> getSameOrderId(@Param("loginCompany")String company, @Param("factoryId")String factoryId);



	
	
	
	

}
